import { getWebGLContext } from "../../lib/cuon-utils"

export default class CatchCanvas {
    public canvas
    public webgl
    constructor() {
        this.canvas = document.getElementById('webgl')
        this.webgl = getWebGLContext(this.canvas, null)//使用封装好的，来适应不同brower
    }
    public Clear() {
        this.webgl.clear(this.webgl.COLOR_BUFFER_BIT)
    }
    public set colorPan(color) {
        this.webgl.clearColor(color.red, color.green, color.blue, color.opacity)
    }
}

